@extends('layouts.console_main')
@section('resources')
    @parent
    <style type="text/css">
        .x_content ol{  display: block;  }
        .tree{ line-height: 25px;padding: 20px;}
    </style>
@endsection
@section('content')
    <div class="right_col" role="main">
        <div class="">
            <div class="page-title">
                <div class="title_left">
                    <h2>阀门管理  >>  树状结构 </h2>
                </div>
            </div>
            <div class="clearfix"></div>
            <div class="row">
                <div class="col-md-12 col-sm-12 col-xs-12">
                    <div class="x_panel">
                        <div class="x_title">
                            <h2>江西省肿瘤医院</h2>
                            <ol class="nav navbar-right panel_toolbox">
                                <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                                </li>
                                <li class="dropdown">
                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
                                    <ul class="dropdown-menu" role="menu">
                                        <li><a href="#">Settings 1</a>
                                        </li>
                                        <li><a href="#">Settings 2</a>
                                        </li>
                                    </ul>
                                </li>
                                <li><a class="close-link"><i class="fa fa-close"></i></a>
                                </li>
                            </ol>
                            <div class="clearfix"></div>
                        </div>
                        <div class="x_content">
                            <div class="table-responsive">
                                <div class="main tree">
                                    <span><i class="fa fa-futbol-o"></i>  总阀门      <a href="/valve/get?id=1"><i class="fa fa-futbol-o"></i></a></span>
                                    <ol>
                                        @foreach($child_list as $child)
                                            @if($child['is_father'])
                                                <li>
                                                    <span><i class="fa fa-sitemap"></i> {{$child['name']}}     <a href="/valve/get?id={{$child['id']}}"><i class="fa fa-futbol-o"></i></a></span>
                                                    <ol>
                                                        @foreach($child['second_class_node_list'] as $second_child_list)
                                                        <li><span><i class="fa fa-sitemap"></i> {{$second_child_list['name']}}</span>    <a href="/valve/get?id={{$second_child_list['id']}}"><i class="fa fa-futbol-o"></i></a></li>
                                                        @endforeach
                                                    </ol>
                                                </li>
                                            @else
                                                <li>
                                                    <span><i class="fa fa-sitemap"></i> {{$child['name']}}      <a href="/valve/get?id={{$child['id']}}"><i class="fa fa-futbol-o"></i></a></span>
                                                </li>
                                            @endif
                                        @endforeach
                                    </ol>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="clearfix"></div>

                <div class="col-md-12 col-sm-12 col-xs-12">
                    <div class="x_panel">
                        <div class="x_title">
                            <h2>其他医院</h2>
                            <ul class="nav navbar-right panel_toolbox">
                                <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                                </li>
                                <li class="dropdown">
                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
                                    <ul class="dropdown-menu" role="menu">
                                        <li><a href="#">Settings 1</a>
                                        </li>
                                        <li><a href="#">Settings 2</a>
                                        </li>
                                    </ul>
                                </li>
                                <li><a class="close-link"><i class="fa fa-close"></i></a>
                                </li>
                            </ul>
                            <div class="clearfix"></div>
                        </div>
                        <div class="x_content">
                            <div class="table-responsive">

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection
@section('scriptResources')
    @parent
    <script>
        $(document).ready(function () {
            $(".main  span").click(
                function () {
                    $(this).next().toggle();
                }
            );
        });
    </script>
@endsection

